//
//  WDTarget_WorkOrder.m
//  wd-serviceapp
//
//  Created by Bin Tang on 2024/8/2.
//

#import "WDTarget_WorkOrder.h"
#import "WDWorkOrderViewController.h"
#import "WDWorkOrderItemViewController.h"
#import "WDWorkOrderSearchViewController.h" // 搜索

@implementation WDTarget_WorkOrder

/// 工单
/// - Parameter params: params description
- (UIViewController *)action_rootWorkOrder:(NSDictionary *)params {
    
    NSArray *subVC = [WDWorkOrderViewController setupViewControllers:@{}];
    NSArray *titles = [WDWorkOrderViewController setupMenuTitles];
    TYZPageConfigration *config = [WDWorkOrderViewController setupConfig];
    WDWorkOrderViewController *vc = [[WDWorkOrderViewController alloc] initPageWithControllers:subVC titles:titles config:config];
    
    return vc;
}

- (UIViewController *)action_workOrderItem:(NSDictionary *)params {
    WDWorkOrderItemViewController *vc = [[WDWorkOrderItemViewController alloc] init];
    vc.servType = [params[@"servType"] integerValue];
    return vc;
}

// WDWorkOrderItemViewController

/// 工单搜索
/// - Parameter params: params description
- (UIViewController *)action_workOrderSearch:(NSDictionary *)params {
    WDWorkOrderSearchViewController *vc = [[WDWorkOrderSearchViewController alloc] init];
    vc.searchMsg = params[@"searchMsg"];
    vc.searchType = params[@"searchType"];
    return vc;
}
//WDWorkOrderSearchViewController

@end
